import { createStore, applyMiddleware } from 'redux'
import thunk from 'redux-thunk' // redux-thunk处理异步
import { composeWithDevTools } from 'redux-devtools-extension' //使用调试工具
import reducer from './reducer'
export default createStore(reducer, composeWithDevTools(applyMiddleware(thunk)))
// store.subscribe(()=>{
//  localStorage.setItem('todos', JSON.stringify(store.getState()))
//})
